	<?php echo form_open_multipart('adminroom/addfunctions/'.$id.'/'.$parentid.'/'.$productid.'/'.$index); ?>
		<link href="<?php echo $this->config->item('base_url').$this->config->item('template'); ?>styles/paging.css" media="screen" rel="stylesheet" type="text/css" />
		<fieldset>
			<label>Quản lý sản phẩm </label>	
			<section>
				<label>các chuyên mục</label>
				<table>
				<thead>
					<tr> 
						<th>Ảnh đại diện</th>
						<th>Sản phẩm</th>
						<th>Bài viết</th>
						<th>Kích hoạt</th>
						<th>Lượt xem</th>
						<th>Tac giả</th>
						<th>Số lượng</th>
						<th>Tin hot</th> 
						<th colspan="3">chỉnh sửa</th> 
					</tr>
				</thead>
				<tbody>
					<?php foreach($producttable as $row){?>
					<tr> 	
						<td><img src="<?php echo $this->config->item('base_url').$row->imgpath; ?>" width="50px" height="50px"></td>
						<td><?php print $row->productname ?></td>
						<td><?php print $row->roomname ?></td>
						<td><?php print $row->active ?></td>
						<td><?php print $row->view ?></td> 
						<td><?php print $row->userid ?></td> 	
						<td><?php print $row->numberwrite ?></td> 						
						<td><?php print $row->ishot ?></td> 
						<td><a href="<?php echo $this->config->item('base_url').'index.php/adminroom/child/'.$row->id.'/'.$parentid.'/'.$row->productid.'/1'; ?>">trả lời</a></td>
						<td><a href="<?php echo $this->config->item('base_url').'index.php/adminroom/index/'.$row->id.'/'.$parentid.'/'.$row->productid.'/'.$index ?>">sửa</a></td>
						<td><a href="<?php echo $this->config->item('base_url').'index.php/adminroom/delete/'.$row->id.'/'.$parentid.'/'.$row->productid.'/'.$index ?>">xóa</a></td>
					</tr>
					<?php } ?>
					<tr>
						<td colspan="11"><?php print $pagging ?></td>
					</tr> 
				</tbody>
				</table>
				&nbsp;<a href="<?php echo $this->config->item('base_url').'index.php/adminroom/index/0/'.$productid.'/'.$index ?>" style="font-weight: bold;padding:10px 10px 10px 10px;text-decoration:none;box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) inset;border-radius: 4px 4px 4px 4px;">thêm</a>
				<br /><br />
			</section>
			<section><label for="text_field" >Tên bài viết</label>
				<div><input type="text" id="text_roomname" name="text_roomname"  value="<?php echo $roomname; ?>" ></div>
			</section>
			<section><label for="textarea_auto">Mô tả<br><span>thông tin bài viết</span></label>
				<div><textarea id="textarea_descr" name="textarea_descr" data-autogrow="true"><?php echo $description;?></textarea>
				</div>
			</section>
			<section><label for="textarea_auto">Chi tiết bài viết<br><span>(W)hat (y)ou (s)ee (i)s (w)hat (y)ou (g)et</span></label>
				<div><textarea id="textarea_content" name="textarea_content" class="html" rows="12"><?php echo $content;?></textarea>
				</div>
			</section>
			<section>
				<label for="file_upload">Ảnh sản phẩm<br>
					<span>File có định dạng: jpg|jpeg|gif|png</span>
				</label>
				<div><input type="file" id="userfile" name="userfile"></div>
				<div><input type="text" id="text_imgpath" name="text_imgpath"  value="<?php echo $imgpath;?>"></div>
			</section>
			<section><label for="url">Số lượt xem</label>
				<div><input id="view" name="view" type="text" placeholder="0" value="<?php echo $view;?>">
				</div>
			</section>
			<section><label for="url">Tác giả</label>
				<div><input id="text_userid" name="utext_serid" type="text" placeholder="" value="<?php echo $userid;?>">
				</div>
			</section>
			<section>
				<label>Trạng thái</label>
				<div>
					<input type="checkbox" id="check_active" name="check_active" <?php if($active>0){echo "checked='checked'";}?> ><label for="apples_check">Kích hoạt</label>
					<input type="checkbox" id="check_ishot" name="check_ishot" <?php if($ishot>0){echo "checked='checked'";}?> ><label for="bananas_check">tin hot</label>
				</div>
			</section>
		</fieldset>
		<section>
			<?php echo form_submit('submit',"Cập nhật");  ?>
		</section>
<?php echo form_close();?>

